

/* First created by JCasGen Thu Mar 17 15:01:54 CET 2011 */
package fr.univnantes.lina.uima.connectors.types;

import org.apache.uima.jcas.JCas; 
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.jcas.cas.TOP_Type;

import org.apache.uima.jcas.cas.FSArray;
import org.apache.uima.jcas.tcas.Annotation;
import org.apache.uima.jcas.cas.StringArray;


/** 
 * Updated by JCasGen Fri Mar 18 22:36:43 CET 2011
 * XML source: /media/MyPassport/current/public/research/UIMA-USER-DEV-ENV/workspace/uima-connectors/desc/connectors/xml/XML2CASAE.xml
 * @generated */
public class XMLElementAnnotation extends Annotation {
  /** @generated
   * @ordered 
   */
  public final static int typeIndexID = JCasRegistry.register(XMLElementAnnotation.class);
  /** @generated
   * @ordered 
   */
  public final static int type = typeIndexID;
  /** @generated  */
  public              int getTypeIndexID() {return typeIndexID;}
 
  /** Never called.  Disable default constructor
   * @generated */
  protected XMLElementAnnotation() {}
    
  /** Internal - constructor used by generator 
   * @generated */
  public XMLElementAnnotation(int addr, TOP_Type type) {
    super(addr, type);
    readObject();
  }
  
  /** @generated */
  public XMLElementAnnotation(JCas jcas) {
    super(jcas);
    readObject();   
  } 

  /** @generated */  
  public XMLElementAnnotation(JCas jcas, int begin, int end) {
    super(jcas);
    setBegin(begin);
    setEnd(end);
    readObject();
  }   

  /** <!-- begin-user-doc -->
    * Write your own initialization here
    * <!-- end-user-doc -->
  @generated modifiable */
  private void readObject() {}
     
 
    
  //*--------------*
  //* Feature: elementName

  /** getter for elementName - gets 
   * @generated */
  public String getElementName() {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_elementName == null)
      jcasType.jcas.throwFeatMissing("elementName", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    return jcasType.ll_cas.ll_getStringValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_elementName);}
    
  /** setter for elementName - sets  
   * @generated */
  public void setElementName(String v) {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_elementName == null)
      jcasType.jcas.throwFeatMissing("elementName", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.ll_cas.ll_setStringValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_elementName, v);}    
   
    
  //*--------------*
  //* Feature: attributeNames

  /** getter for attributeNames - gets 
   * @generated */
  public StringArray getAttributeNames() {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributeNames == null)
      jcasType.jcas.throwFeatMissing("attributeNames", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    return (StringArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeNames)));}
    
  /** setter for attributeNames - sets  
   * @generated */
  public void setAttributeNames(StringArray v) {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributeNames == null)
      jcasType.jcas.throwFeatMissing("attributeNames", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.ll_cas.ll_setRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeNames, jcasType.ll_cas.ll_getFSRef(v));}    
    
  /** indexed getter for attributeNames - gets an indexed value - 
   * @generated */
  public String getAttributeNames(int i) {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributeNames == null)
      jcasType.jcas.throwFeatMissing("attributeNames", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeNames), i);
    return jcasType.ll_cas.ll_getStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeNames), i);}

  /** indexed setter for attributeNames - sets an indexed value - 
   * @generated */
  public void setAttributeNames(int i, String v) { 
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributeNames == null)
      jcasType.jcas.throwFeatMissing("attributeNames", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeNames), i);
    jcasType.ll_cas.ll_setStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeNames), i, v);}
   
    
  //*--------------*
  //* Feature: attributeValues

  /** getter for attributeValues - gets 
   * @generated */
  public StringArray getAttributeValues() {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributeValues == null)
      jcasType.jcas.throwFeatMissing("attributeValues", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    return (StringArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeValues)));}
    
  /** setter for attributeValues - sets  
   * @generated */
  public void setAttributeValues(StringArray v) {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributeValues == null)
      jcasType.jcas.throwFeatMissing("attributeValues", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.ll_cas.ll_setRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeValues, jcasType.ll_cas.ll_getFSRef(v));}    
    
  /** indexed getter for attributeValues - gets an indexed value - 
   * @generated */
  public String getAttributeValues(int i) {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributeValues == null)
      jcasType.jcas.throwFeatMissing("attributeValues", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeValues), i);
    return jcasType.ll_cas.ll_getStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeValues), i);}

  /** indexed setter for attributeValues - sets an indexed value - 
   * @generated */
  public void setAttributeValues(int i, String v) { 
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributeValues == null)
      jcasType.jcas.throwFeatMissing("attributeValues", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeValues), i);
    jcasType.ll_cas.ll_setStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributeValues), i, v);}
   
    
  //*--------------*
  //* Feature: attributes

  /** getter for attributes - gets 
   * @generated */
  public FSArray getAttributes() {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributes == null)
      jcasType.jcas.throwFeatMissing("attributes", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributes)));}
    
  /** setter for attributes - sets  
   * @generated */
  public void setAttributes(FSArray v) {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributes == null)
      jcasType.jcas.throwFeatMissing("attributes", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.ll_cas.ll_setRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributes, jcasType.ll_cas.ll_getFSRef(v));}    
    
  /** indexed getter for attributes - gets an indexed value - 
   * @generated */
  public XMLAttributeAnnotation getAttributes(int i) {
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributes == null)
      jcasType.jcas.throwFeatMissing("attributes", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributes), i);
    return (XMLAttributeAnnotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributes), i)));}

  /** indexed setter for attributes - sets an indexed value - 
   * @generated */
  public void setAttributes(int i, XMLAttributeAnnotation v) { 
    if (XMLElementAnnotation_Type.featOkTst && ((XMLElementAnnotation_Type)jcasType).casFeat_attributes == null)
      jcasType.jcas.throwFeatMissing("attributes", "fr.univnantes.lina.uima.connectors.types.XMLElementAnnotation");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributes), i);
    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((XMLElementAnnotation_Type)jcasType).casFeatCode_attributes), i, jcasType.ll_cas.ll_getFSRef(v));}
  }

    